//该文件专门用于创建整个应用的路由器
import VueRouter from 'vue-router'
//引入组件
import About from '../pages/About'
import Home from '../pages/Home'
import Main from '../pages/Main'
import Edu from '../pages/Edu'
import Operation from '../pages/Operation'
import StuInfo from '../pages/StuInfo'
import TeacherCourse from '../pages/TeacherCourse'
import StudentSelectCourse from '../pages/StudentSelectCourse'
import FanYa from '../pages/FanYa'
import User from '../pages/User'
import Application from '../pages/Application'
import Terminal from '../pages/Terminal'
import Data from '../pages/Data'
import Up from '../pages/Up'
import Register from '../components/Register'
import Login from '../components/Login'
import Details from '../pages/Details'
//创建并暴漏一个路由器
export default new VueRouter({
	routes: [{
			path: '/edu',
			component: Edu,
			children: [{
					path: 'about',
					component: About
				},
				{
					path: 'details',
					component: Details
				},
				{
					path: 'stuinfo',
					component: StuInfo
				},
				{
					path: 'teachercourse',
					component: TeacherCourse
				},
				{
					path: 'studentselectcourse',
					component: StudentSelectCourse
				},
				{
					path: 'up',
					component: Up
				},
				{
					path: 'home',
					component: Home
				}
			]
		},
		{
			path: '/register',
			name: 'register',
			component: Register
		},
		{
			path: '/login',
			name: 'login',
			component: Login
		},
		{
			path: '/operation',
			component: Operation,
			//子组件
			children: [{
					path: 'about',
					component: About
				},
				{
					path: 'home',
					component: Home
				}

			]
		},
		{
			path: '/main',
			component: Main
		},
		{
			path: '/about',
			component: About
		},
		{
			path: '/home',
			component: Home
		},
		{
			path: '/fanya',
			component: FanYa
		},
		{
			path: '/user',
			component: User
		},
		{
			path: '/application',
			component: Application
		},
		{
			path: '/terminal',
			component: Terminal
		},
		{
			path: '/data',
			component: Data
		},
		{
			path: '/',
			redirect: '/operation'
		},
	]
})
